package org.gesplan.entity.sig;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author David
 */
@Entity
@Table(name = "ev_ug_espais")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "EvUgEspais.findAll", query = "SELECT e FROM EvUgEspais e ORDER BY e.codiUg"),
    @NamedQuery(name = "EvUgEspais.findByCodiUg", query = "SELECT e FROM EvUgEspais e WHERE e.codiUg = :codiUg"),
    @NamedQuery(name = "EvUgEspais.findByCodiCateg", query = "SELECT e FROM EvUgEspais e WHERE e.codiCateg = :codiCateg"),
    @NamedQuery(name = "EvUgEspais.findByDescCateg", query = "SELECT e FROM EvUgEspais e WHERE e.descCateg = :descCateg")
})
public class EvUgEspais implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "codi_ug")
    private String codiUg;
    @Column(name = "codi_categ")
    private Integer codiCateg;
    @Column(name = "desc_categ")
    private String descCateg;
    @Column(name = "nom_ug")
    private String nomUg;
    @Column(name = "desc_ug")
    private String descUg;


    public EvUgEspais() {
    }


    public EvUgEspais(String codiUg) {
        this.codiUg = codiUg;
    }


    public String getCodiUg() {
        return codiUg;
    }


    public void setCodiUg(String codiUg) {
        this.codiUg = codiUg;
    }


    public Integer getCodiCateg() {
        return codiCateg;
    }


    public void setCodiCateg(Integer codiCateg) {
        this.codiCateg = codiCateg;
    }


    public String getDescCateg() {
        return descCateg;
    }


    public void setDescCateg(String descCateg) {
        this.descCateg = descCateg;
    }


    public String getNomUg() {
        return nomUg;
    }


    public void setNomUg(String nomUg) {
        this.nomUg = nomUg;
    }


    public String getDescUg() {
        return descUg;
    }


    public void setDescUg(String descUg) {
        this.descUg = descUg;
    }


    @Override
    public int hashCode() {
        int hash = 0;
        hash += (codiUg != null ? codiUg.hashCode() : 0);
        return hash;
    }


    @Override
    public boolean equals(Object object) {
        if (!(object instanceof EvUgEspais)) {
            return false;
        }
        EvUgEspais other = (EvUgEspais) object;
        return (this.codiUg != null || other.codiUg == null) && (this.codiUg == null || this.codiUg.equals(other.codiUg));
    }


    @Override
    public String toString() {
        return codiUg + " - " + nomUg;
    }
    
    
}